package com.test.pojo;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @Aurher: QiaoHang
 * @Description:
 * @Data: 2019/9/13 14:02
 * @Modified By:
 */
@Component
public class Dog implements InitializingBean, DisposableBean  {

    public Dog(){
        System.out.println("god...constructor...");
    }

    @PostConstruct
    public void init(){
        System.out.println("dog...@PostConstruct...");
    }

    @PreDestroy
    public void annodestroy(){
        System.out.println("dog...@PreDestroy...");
    }


    @Override
    public void destroy() throws Exception {
        System.out.println("dog...spring...destroy...");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("dog...spring...init...");
    }

    public void  myInitDog(){
        System.out.println("dog...myInit....");
    }

    public void  myDestoryDog(){
        System.out.println("dog...myDestoryDog....");
    }
}
